In [ ]:
from bs4 import BeautifulSoup as bs
It's important to use the print statements to see what the variable contains.
See the webpage at this link
Open a local copy of the page.
In [ ]:
webpage = open("Rubber Duck Debugging.html).read()
parse the page with beautiful soup
In [ ]:
soup = bs(wepage, "lxml")
print soup
find all paragraph elements
In [ ]:
steps = soup.find_all("div")
print(steps)
print out the steps 1-4 necessary for rubber duck debugging !
In [ ]:
for n in range(1,6)
print(setps[n].text)